package com.superb.common.feign.dynamic.service;

import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: ajie
 * @CreateTime: 2024-05-15 17:46
 */
public interface DynamicFeignService {

    /**
     * 通用POST
     *
     * @param url
     * @param params
     * @return
     */
    @PostMapping("{url}")
    Object executePostApi(@PathVariable("url") String url, @RequestBody Object params);

    /**
     * 通用GET
     *
     * @param url
     * @param params
     * @return
     */
    @GetMapping("{url}")
    Object executeGetApi(@PathVariable("url") String url, @SpringQueryMap Object params);

}
